Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support match_when_empty for rule condition #8809

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

CPunisher
Copy link
Contributor

@CPunisher CPunisher commented Dec 23, 2024

Summary

Closes #8267
Align with webpack https://github.com/webpack/webpack/blob/main/lib/rules/RuleSetCompiler.js#L237

Considering the match_when_empty is only calculated once and TryFrom can't be async, I use RwLock for cache. It's better to run benchmarks to see if there's performance regression.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@github-actions github-actions bot added the release: feature release: feature related release(mr only) label Dec 23, 2024
Copy link

netlify bot commented Dec 23, 2024

Deploy Preview for rspack canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 8c26740
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/6768ffe298b5760008aa1ccf

Copy link

codspeed-hq bot commented Dec 23, 2024

CodSpeed Performance Report

Merging #8809 will not alter performance

Comparing CPunisher:feat/match-when-empty (8c26740) with main (99df94b)

Summary

✅ 1 untouched benchmarks

crates/rspack_core/src/options/module.rs Outdated Show resolved Hide resolved
crates/rspack_core/src/options/module.rs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: feature release: feature related release(mr only)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Rule.with support match LogicalCondition not
2 participants